Skip to content

Removed pydantic V2 protected messages to avoid unnecessary warnings to users #1796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

Gabefire
Copy link
Collaborator

@Gabefire Gabefire commented Sep 9, 2024

Description

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

All Submissions

  • Have you followed the guidelines in our Contributing document?
  • Have you provided a description?
  • Are your changes properly formatted?

@Gabefire Gabefire requested a review from a team as a code owner September 9, 2024 17:11
@Gabefire Gabefire force-pushed the gu/pydantic_remove_depercated_messages branch from f824abe to 2bd2c7f Compare September 9, 2024 17:20
@@ -24,7 +24,8 @@ class RasterData(BaseModel, ABC):
uid: Optional[str] = None
global_key: Optional[str] = None
arr: Optional[TypedArray[Literal['uint8']]] = None
model_config = ConfigDict(extra="forbid", copy_on_model_validation="none")

model_config = ConfigDict(extra="forbid")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was copy_on_model_validation removed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
Pydantic V2 removed it :( with no alternative

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It throws a warning to users if you import this library and technically does nothing

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
This is what it used to do. We don't have a way to add this behavior anymore but Im not sure why the original author added this setting it is the only place that includes this in the config settings

@Gabefire Gabefire requested a review from vbrodsky September 9, 2024 19:09
@Gabefire Gabefire merged commit 86178a4 into develop Sep 10, 2024
25 checks passed
@Gabefire Gabefire deleted the gu/pydantic_remove_depercated_messages branch September 10, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants